home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1991-06-04 | 4.9 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Jun 4 01:26:10 1991, modified Tue Jun 4 01:26:10 1991, creator 'MPS ', type ASCII, 4281 bytes "Exceptions.h" , at 0x1139 428 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 45 78 63 65 70 74 | 69 6f 6e 73 2e 68 00 00 |..Except|ions.h..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 10 b9 00 | 00 01 ac a4 70 d4 f2 a4 |........|....p...|
|00000060| 70 d4 f2 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |p.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 e7 e4 00 00 |........|........|
|00000080| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0d 0d 09 46 |--------|----...F|
|000000e0| 69 6c 65 3a 09 09 45 78 | 63 65 70 74 69 6f 6e 73 |ile:..Ex|ceptions|
|000000f0| 2e 68 0d 09 44 65 73 63 | 3a 09 09 45 78 63 65 70 |.h..Desc|:..Excep|
|00000100| 74 69 6f 6e 20 68 61 6e | 64 6c 69 6e 67 20 6d 65 |tion han|dling me|
|00000110| 63 68 61 6e 69 73 6d 20 | 26 20 6d 61 63 72 6f 73 |chanism |& macros|
|00000120| 20 66 6f 72 20 43 2b 2b | 20 28 61 6e 64 20 43 29 | for C++| (and C)|
|00000130| 0d 09 0d 09 4d 69 63 68 | 61 65 6c 20 43 2e 20 47 |....Mich|ael C. G|
|00000140| 72 65 65 6e 73 70 6f 6e | 2c 20 49 6e 74 65 67 72 |reenspon|, Integr|
|00000150| 61 6c 20 49 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 53 |al Infor|mation S|
|00000160| 79 73 74 65 6d 73 2c 20 | 42 65 72 6b 65 6c 65 79 |ystems, |Berkeley|
|00000170| 2c 20 43 41 0d 09 28 34 | 31 35 29 20 35 32 34 2d |, CA..(4|15) 524-|
|00000180| 35 32 30 30 3b 20 41 6c | 69 6e 6b 3a 20 49 4e 54 |5200; Al|ink: INT|
|00000190| 45 47 52 41 4c 3b 20 49 | 6e 74 65 72 6e 65 74 3a |EGRAL; I|nternet:|
|000001a0| 20 6d 63 67 40 76 69 6f | 6c 65 74 2e 62 65 72 6b | mcg@vio|let.berk|
|000001b0| 65 6c 65 79 2e 65 64 75 | 0d 0d 09 42 61 73 65 64 |eley.edu|...Based|
|000001c0| 20 6f 6e 20 6f 72 69 67 | 69 6e 61 6c 20 62 79 20 | on orig|inal by |
|000001d0| 41 6e 64 72 65 77 20 53 | 68 65 62 61 6e 6f 77 20 |Andrew S|hebanow |
|000001e0| 28 6f 72 69 67 69 6e 61 | 6c 20 76 65 72 73 69 6f |(origina|l versio|
|000001f0| 6e 20 62 79 20 41 6e 64 | 79 20 48 65 6e 69 6e 67 |n by And|y Hening|
|00000200| 65 72 29 0d 09 6f 66 20 | 41 70 70 6c 65 20 4d 61 |er)..of |Apple Ma|
|00000210| 63 69 6e 74 6f 73 68 20 | 44 65 76 65 6c 6f 70 65 |cintosh |Develope|
|00000220| 72 20 54 65 63 68 6e 69 | 63 61 6c 20 53 75 70 70 |r Techni|cal Supp|
|00000230| 6f 72 74 0d 0d 09 50 6f | 72 74 69 6f 6e 73 20 43 |ort...Po|rtions C|
|00000240| 6f 70 79 72 69 67 68 74 | 20 a9 20 31 39 38 39 2d |opyright| . 1989-|
|00000250| 31 39 39 30 20 41 70 70 | 6c 65 20 43 6f 6d 70 75 |1990 App|le Compu|
|00000260| 74 65 72 2c 20 49 6e 63 | 2e 0d 09 41 6c 6c 20 72 |ter, Inc|...All r|
|00000270| 69 67 68 74 73 20 72 65 | 73 65 72 76 65 64 2e 0d |ights re|served..|
|00000280| 0d 09 53 65 65 20 6f 72 | 69 67 69 6e 61 6c 20 61 |..See or|iginal a|
|00000290| 73 20 64 69 73 74 72 69 | 62 75 74 65 64 20 77 69 |s distri|buted wi|
|000002a0| 74 68 20 73 61 6d 70 6c | 65 20 63 6f 64 65 20 23 |th sampl|e code #|
|000002b0| 31 34 20 66 6f 72 20 74 | 68 65 6f 72 79 20 6f 66 |14 for t|heory of|
|000002c0| 20 6f 70 65 72 61 74 69 | 6f 6e 0d 0d 2d 2d 2d 2d | operati|on..----|
|000002d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000300| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000310| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000320| 2d 2d 2d 2d 2d 2d 2a 2f | 0d 0d 23 69 66 6e 64 65 |------*/|..#ifnde|
|00000330| 66 20 5f 5f 45 58 43 45 | 50 54 49 4f 4e 53 5f 5f |f __EXCE|PTIONS__|
|00000340| 0d 23 64 65 66 69 6e 65 | 20 5f 5f 45 58 43 45 50 |.#define| __EXCEP|
|00000350| 54 49 4f 4e 53 5f 5f 0d | 0d 23 69 66 6e 64 65 66 |TIONS__.|.#ifndef|
|00000360| 20 5f 5f 54 59 50 45 53 | 5f 5f 0d 23 69 6e 63 6c | __TYPES|__.#incl|
|00000370| 75 64 65 20 3c 54 79 70 | 65 73 2e 68 3e 0d 23 65 |ude <Typ|es.h>.#e|
|00000380| 6e 64 69 66 0d 0d 23 69 | 66 6e 64 65 66 09 5f 5f |ndif..#i|fndef.__|
|00000390| 45 52 52 4f 52 53 5f 5f | 0d 23 69 6e 63 6c 75 64 |ERRORS__|.#includ|
|000003a0| 65 20 3c 45 72 72 6f 72 | 73 2e 68 3e 0d 23 65 6e |e <Error|s.h>.#en|
|000003b0| 64 69 66 0d 0d 23 69 66 | 6e 64 65 66 20 5f 5f 53 |dif..#if|ndef __S|
|000003c0| 45 54 4a 4d 50 5f 5f 0d | 23 69 6e 63 6c 75 64 65 |ETJMP__.|#include|
|000003d0| 20 3c 53 65 74 4a 6d 70 | 2e 68 3e 0d 23 65 6e 64 | <SetJmp|.h>.#end|
|000003e0| 69 66 0d 0d 2f 2f 20 49 | 6e 20 74 68 65 20 4d 61 |if..// I|n the Ma|
|000003f0| 63 41 70 70 20 6b 69 74 | 2e 2e 2e 0d 23 69 6e 63 |cApp kit|....#inc|
|00000400| 6c 75 64 65 20 22 55 46 | 61 69 6c 75 72 65 2e 68 |lude "UF|ailure.h|
|00000410| 22 0d 0d 23 69 66 64 65 | 66 09 5f 5f 63 70 6c 75 |"..#ifde|f.__cplu|
|00000420| 73 70 6c 75 73 0d 65 78 | 74 65 72 6e 20 22 43 22 |splus.ex|tern "C"|
|00000430| 20 7b 0d 23 65 6e 64 69 | 66 0d 2f 2f 20 53 69 6e | {.#endi|f.// Sin|
|00000440| 63 65 20 77 65 20 65 61 | 74 20 74 68 65 20 65 72 |ce we ea|t the er|
|00000450| 72 6f 72 20 63 6f 64 65 | 20 61 6e 64 20 6d 65 73 |ror code| and mes|
|00000460| 73 61 67 65 20 74 68 61 | 74 20 74 68 65 20 4d 61 |sage tha|t the Ma|
|00000470| 63 41 70 70 20 66 61 69 | 6c 75 72 65 20 75 6e 69 |cApp fai|lure uni|
|00000480| 74 0d 09 2f 2f 20 70 61 | 73 73 65 73 20 75 73 2c |t..// pa|sses us,|
|00000490| 20 77 65 20 6e 65 65 64 | 20 74 6f 20 73 74 6f 72 | we need| to stor|
|000004a0| 65 20 74 68 65 6d 20 73 | 6f 6d 65 70 6c 61 63 65 |e them s|omeplace|
|000004b0| 20 77 68 65 72 65 20 79 | 6f 75 72 20 66 61 69 6c | where y|our fail|
|000004c0| 75 72 65 0d 09 2f 2f 20 | 68 61 6e 64 6c 69 6e 67 |ure..// |handling|
|000004d0| 20 63 6f 64 65 20 63 61 | 6e 20 67 65 74 20 61 74 | code ca|n get at|
|000004e0| 20 69 74 2e 20 57 65 20 | 75 73 65 20 67 6c 6f 62 | it. We |use glob|
|000004f0| 61 6c 20 76 61 72 69 61 | 62 6c 65 73 20 28 6b 65 |al varia|bles (ke|
|00000500| 65 6e 2c 20 65 68 3f 29 | 2e 0d 09 65 78 74 65 72 |en, eh?)|...exter|
|00000510| 6e 20 6c 6f 6e 67 20 67 | 46 61 69 6c 4d 65 73 73 |n long g|FailMess|
|00000520| 61 67 65 3b 09 09 2f 2f | 20 43 75 72 72 65 6e 74 |age;..//| Current|
|00000530| 20 66 61 69 6c 75 72 65 | 20 6d 65 73 73 61 67 65 | failure| message|
|00000540| 0d 09 65 78 74 65 72 6e | 20 73 68 6f 72 74 20 67 |..extern| short g|
|00000550| 46 61 69 6c 45 72 72 6f | 72 3b 09 09 2f 2f 20 43 |FailErro|r;..// C|
|00000560| 75 72 72 65 6e 74 20 66 | 61 69 6c 75 72 65 20 65 |urrent f|ailure e|
|00000570| 72 72 6f 72 0d 0d 09 70 | 61 73 63 61 6c 20 76 6f |rror...p|ascal vo|
|00000580| 69 64 20 53 74 61 6e 64 | 61 72 64 48 61 6e 64 6c |id Stand|ardHandl|
|00000590| 65 72 28 73 68 6f 72 74 | 20 65 2c 20 6c 6f 6e 67 |er(short| e, long|
|000005a0| 20 6d 2c 20 76 6f 69 64 | 2a 20 48 61 6e 64 6c 65 | m, void|* Handle|
|000005b0| 72 5f 53 74 61 74 69 63 | 4c 69 6e 6b 29 3b 0d 23 |r_Static|Link);.#|
|000005c0| 69 66 64 65 66 09 5f 5f | 63 70 6c 75 73 70 6c 75 |ifdef.__|cplusplu|
|000005d0| 73 0d 7d 3b 0d 23 65 6e | 64 69 66 0d 0d 2f 2f 20 |s.};.#en|dif..// |
|000005e0| 36 20 4d 61 72 20 39 31 | 20 6d 63 67 0d 2f 2f 0d |6 Mar 91| mcg.//.|
|000005f0| 2f 2f 20 48 61 68 21 20 | 4a 75 73 74 20 61 20 6c |// Hah! |Just a l|
|00000600| 69 74 74 6c 65 20 6d 61 | 63 72 6f 20 74 77 65 61 |ittle ma|cro twea|
|00000610| 6b 69 6e 67 20 68 65 72 | 65 20 61 6e 64 20 6e 6f |king her|e and no|
|00000620| 77 20 77 65 20 63 61 6e | 20 77 72 69 74 65 3a 0d |w we can| write:.|
|00000630| 2f 2f 0d 2f 2f 09 09 74 | 72 79 20 7b 0d 2f 2f 09 |//.//..t|ry {.//.|
|00000640| 09 09 73 74 75 66 66 20 | 74 68 61 74 20 6d 69 67 |..stuff |that mig|
|00000650| 68 74 20 74 68 72 6f 77 | 20 61 6e 20 65 78 63 65 |ht throw| an exce|
|00000660| 70 74 69 6f 6e 3b 0d 2f | 2f 09 09 7d 0d 2f 2f 09 |ption;./|/..}.//.|
|00000670| 09 63 61 74 63 68 20 7b | 0d 2f 2f 09 09 09 64 6f |.catch {|.//...do|
|00000680| 20 73 74 75 66 66 20 74 | 6f 20 72 65 63 6f 76 65 | stuff t|o recove|
|00000690| 72 3b 0d 2f 2f 09 09 09 | 62 72 65 61 6b 3b 09 2f |r;.//...|break;./|
|000006a0| 2f 20 65 78 69 74 20 68 | 61 6e 64 6c 65 72 2c 20 |/ exit h|andler, |
|000006b0| 72 65 63 6f 76 65 72 65 | 64 0d 2f 2f 09 09 7d 0d |recovere|d.//..}.|
|000006c0| 2f 2f 0d 2f 2f 0d 2f 2f | 09 4f 72 3a 0d 2f 2f 0d |//.//.//|.Or:.//.|
|000006d0| 2f 2f 09 09 74 72 79 20 | 73 6f 6d 65 74 68 69 6e |//..try |somethin|
|000006e0| 67 3b 0d 2f 2f 09 09 63 | 61 74 63 68 20 62 72 65 |g;.//..c|atch bre|
|000006f0| 61 6b 3b 0d 2f 2f 0d 2f | 2f 09 77 68 69 63 68 20 |ak;.//./|/.which |
|00000700| 72 65 63 6f 76 65 72 73 | 20 66 72 6f 6d 20 61 6c |recovers| from al|
|00000710| 6c 20 65 78 63 65 70 74 | 69 6f 6e 73 20 77 69 74 |l except|ions wit|
|00000720| 68 6f 75 74 20 66 75 72 | 74 68 65 72 20 63 68 65 |hout fur|ther che|
|00000730| 63 6b 69 6e 67 2e 0d 2f | 2f 09 46 61 6c 6c 69 6e |cking../|/.Fallin|
|00000740| 67 20 74 68 72 6f 75 67 | 68 20 74 68 65 20 62 6f |g throug|h the bo|
|00000750| 74 74 6f 6d 20 6f 66 20 | 74 68 65 20 63 61 74 63 |ttom of |the catc|
|00000760| 68 20 28 77 69 74 68 6f | 75 74 20 64 6f 69 6e 67 |h (witho|ut doing|
|00000770| 20 61 20 62 72 65 61 6b | 20 6f 72 20 67 6f 74 6f | a break| or goto|
|00000780| 29 0d 2f 2f 09 73 69 67 | 6e 61 6c 73 20 74 68 65 |).//.sig|nals the|
|00000790| 20 6e 65 78 74 20 68 61 | 6e 64 6c 65 72 20 75 70 | next ha|ndler up|
|000007a0| 20 74 68 65 20 63 68 61 | 69 6e 20 62 79 20 63 61 | the cha|in by ca|
|000007b0| 6c 6c 69 6e 67 20 46 61 | 69 6c 75 72 65 28 29 20 |lling Fa|ilure() |
|000007c0| 61 67 61 69 6e 2e 0d 2f | 2f 0d 2f 2f 09 41 6c 73 |again../|/.//.Als|
|000007d0| 6f 20 79 6f 75 20 63 61 | 6e 20 64 6f 20 61 20 62 |o you ca|n do a b|
|000007e0| 72 65 61 6b 20 69 6e 20 | 61 20 74 72 79 20 62 6c |reak in |a try bl|
|000007f0| 6f 63 6b 20 77 68 69 63 | 68 20 6a 75 73 74 20 66 |ock whic|h just f|
|00000800| 61 6c 6c 73 20 6f 75 74 | 20 6f 66 20 74 68 65 20 |alls out| of the |
|00000810| 74 72 79 0d 2f 2f 09 54 | 68 65 20 63 61 74 63 68 |try.//.T|he catch|
|00000820| 20 69 73 20 6f 6e 6c 79 | 20 65 78 65 63 75 74 65 | is only| execute|
|00000830| 64 20 62 79 20 73 6f 6d | 65 74 68 69 6e 67 20 69 |d by som|ething i|
|00000840| 6e 20 74 68 65 20 74 72 | 79 20 74 68 72 6f 77 69 |n the tr|y throwi|
|00000850| 6e 67 20 61 6e 20 65 78 | 63 65 70 74 69 6f 6e 0d |ng an ex|ception.|
|00000860| 2f 2f 0d 2f 2f 09 53 6f | 20 6e 6f 77 20 74 68 69 |//.//.So| now thi|
|00000870| 73 20 66 6f 6c 6c 6f 77 | 73 20 43 20 73 74 72 75 |s follow|s C stru|
|00000880| 63 74 75 72 69 6e 67 20 | 73 79 6e 74 61 78 20 61 |cturing |syntax a|
|00000890| 6e 64 20 69 73 20 61 6c | 73 6f 20 63 6c 6f 73 65 |nd is al|so close|
|000008a0| 72 20 69 6e 20 73 79 6e | 74 61 78 20 74 6f 0d 2f |r in syn|tax to./|
|000008b0| 2f 20 20 70 72 6f 70 6f | 73 65 64 20 43 2b 2b 20 |/ propo|sed C++ |
|000008c0| 65 78 63 65 70 74 69 6f | 6e 20 68 61 6e 64 6c 69 |exceptio|n handli|
|000008d0| 6e 67 20 6d 65 63 68 61 | 6e 69 73 6d 73 0d 2f 2f |ng mecha|nisms.//|
|000008e0| 0d 2f 2f 09 65 72 72 61 | 74 61 3a 20 79 6f 75 20 |.//.erra|ta: you |
|000008f0| 63 61 6e 20 6f 6e 6c 79 | 20 68 61 76 65 20 6f 6e |can only| have on|
|00000900| 65 20 74 72 79 2e 2e 2e | 63 61 74 63 68 20 70 61 |e try...|catch pa|
|00000910| 69 72 20 70 65 72 20 62 | 6c 6f 63 6b 2e 20 49 66 |ir per b|lock. If|
|00000920| 20 79 6f 75 20 77 61 6e | 74 20 6d 6f 72 65 20 74 | you wan|t more t|
|00000930| 68 61 6e 0d 2f 2f 09 6f | 6e 65 2c 20 65 6e 63 6c |han.//.o|ne, encl|
|00000940| 6f 73 65 20 74 68 65 20 | 70 61 69 72 20 69 6e 20 |ose the |pair in |
|00000950| 69 74 73 20 6f 77 6e 20 | 62 6c 6f 63 6b 2e 20 42 |its own |block. B|
|00000960| 75 74 20 74 72 79 20 69 | 73 20 6f 66 74 65 6e 20 |ut try i|s often |
|00000970| 77 69 74 68 69 6e 20 61 | 20 62 6c 6f 63 6b 20 28 |within a| block (|
|00000980| 69 66 2c 20 77 68 69 6c | 65 29 0d 2f 2f 09 61 6e |if, whil|e).//.an|
|00000990| 79 77 61 79 2c 20 73 6f | 20 6e 6f 74 20 72 65 61 |yway, so| not rea|
|000009a0| 6c 6c 79 20 61 20 62 69 | 67 20 64 65 61 6c 2e 20 |lly a bi|g deal. |
|000009b0| 4e 65 73 74 69 6e 67 20 | 74 72 79 2f 63 61 74 63 |Nesting |try/catc|
|000009c0| 68 20 70 61 69 72 73 20 | 77 69 74 68 69 6e 20 74 |h pairs |within t|
|000009d0| 72 79 2f 63 61 74 63 68 | 20 62 6c 6f 63 6b 73 0d |ry/catch| blocks.|
|000009e0| 2f 2f 09 69 73 20 6e 6f | 20 70 72 6f 62 20 61 6e |//.is no| prob an|
|000009f0| 64 20 6f 66 74 65 6e 20 | 75 73 65 66 75 6c 2e 0d |d often |useful..|
|00000a00| 2f 2f 0d 2f 2f 09 4e 65 | 76 65 72 20 61 6c 6c 6f |//.//.Ne|ver allo|
|00000a10| 77 20 79 6f 75 72 20 64 | 65 73 74 72 75 63 74 6f |w your d|estructo|
|00000a20| 72 73 20 74 6f 20 74 68 | 72 6f 77 20 65 78 63 65 |rs to th|row exce|
|00000a30| 70 74 69 6f 6e 73 2e 20 | 50 65 72 69 6f 64 2e 0d |ptions. |Period..|
|00000a40| 2f 2f 0d 2f 2f 09 41 6e | 64 2c 20 6f 62 76 69 6f |//.//.An|d, obvio|
|00000a50| 75 73 6c 79 2c 20 74 68 | 65 72 65 20 6d 75 73 74 |usly, th|ere must|
|00000a60| 20 62 65 20 61 20 63 61 | 74 63 68 20 66 6f 72 20 | be a ca|tch for |
|00000a70| 65 76 65 72 79 20 74 72 | 79 2e 2e 2e 0d 2f 2f 0d |every tr|y....//.|
|00000a80| 2f 2f 09 42 65 20 63 61 | 72 65 66 75 6c 20 6e 6f |//.Be ca|reful no|
|00000a90| 74 20 74 6f 20 64 65 63 | 6c 61 72 65 20 61 75 74 |t to dec|lare aut|
|00000aa0| 6f 20 6f 62 6a 65 63 74 | 73 20 74 68 61 74 20 72 |o object|s that r|
|00000ab0| 65 71 75 69 72 65 20 64 | 65 73 74 72 75 63 74 69 |equire d|estructi|
|00000ac0| 6f 6e 20 77 69 74 68 69 | 6e 20 61 20 74 72 79 20 |on withi|n a try |
|00000ad0| 62 6c 6f 63 6b 2e 0d 2f | 2f 09 49 66 20 79 6f 75 |block../|/.If you|
|00000ae0| 20 67 65 74 20 61 6e 20 | 65 78 63 65 70 74 69 6f | get an |exceptio|
|00000af0| 6e 2c 20 74 68 65 20 61 | 75 74 6f 73 20 77 69 6c |n, the a|utos wil|
|00000b00| 6c 20 62 65 20 6f 75 74 | 20 6f 66 20 73 63 6f 70 |l be out| of scop|
|00000b10| 65 20 69 6e 20 74 68 65 | 20 63 61 74 63 68 20 62 |e in the| catch b|
|00000b20| 75 74 20 6e 6f 20 6f 6e | 65 20 77 69 6c 6c 0d 2f |ut no on|e will./|
|00000b30| 2f 09 68 61 76 65 20 63 | 61 6c 6c 65 64 20 74 68 |/.have c|alled th|
|00000b40| 65 20 64 65 73 74 72 75 | 63 74 6f 72 2e 20 42 65 |e destru|ctor. Be|
|00000b50| 20 73 75 72 65 20 74 6f | 20 64 65 73 74 72 6f 79 | sure to| destroy|
|00000b60| 20 6f 74 68 65 72 20 61 | 75 74 6f 73 20 28 65 67 | other a|utos (eg|
|00000b70| 2e 2c 20 74 68 6f 73 65 | 20 77 69 74 68 20 66 75 |., those| with fu|
|00000b80| 6e 63 74 69 6f 6e 0d 2f | 2f 09 73 63 6f 70 65 29 |nction./|/.scope)|
|00000b90| 20 65 78 70 6c 69 63 69 | 74 6c 79 20 77 69 74 68 | explici|tly with|
|00000ba0| 69 6e 20 74 68 65 20 63 | 61 74 63 68 20 62 6c 6f |in the c|atch blo|
|00000bb0| 63 6b 20 62 79 20 63 61 | 6c 6c 69 6e 67 20 74 68 |ck by ca|lling th|
|00000bc0| 65 69 72 20 64 65 73 74 | 72 75 63 74 6f 72 73 20 |eir dest|ructors |
|00000bd0| 62 65 66 6f 72 65 20 74 | 68 72 6f 77 69 6e 67 0d |before t|hrowing.|
|00000be0| 2f 2f 09 74 6f 20 74 68 | 65 20 6e 65 78 74 20 68 |//.to th|e next h|
|00000bf0| 61 6e 64 6c 65 72 2e 20 | 53 79 6e 74 61 78 20 69 |andler. |Syntax i|
|00000c00| 73 20 6f 62 6a 2e 43 6c | 61 73 73 3a 3a 7e 43 6c |s obj.Cl|ass::~Cl|
|00000c10| 61 73 73 28 29 3b 20 69 | 6e 20 74 68 65 20 4d 50 |ass(); i|n the MP|
|00000c20| 57 20 33 2e 31 20 76 65 | 72 73 69 6f 6e 20 6f 66 |W 3.1 ve|rsion of|
|00000c30| 20 43 46 72 6f 6e 74 2c | 0d 2f 2f 09 79 6f 75 20 | CFront,|.//.you |
|00000c40| 6d 75 73 74 20 73 70 65 | 63 69 66 79 20 74 68 65 |must spe|cify the|
|00000c50| 20 43 6c 61 73 73 3a 3a | 20 71 75 61 6c 69 66 69 | Class::| qualifi|
|00000c60| 65 72 2c 20 73 6f 20 74 | 68 69 73 20 64 6f 65 73 |er, so t|his does|
|00000c70| 6e 27 74 20 77 6f 72 6b | 20 70 6f 6c 79 6d 6f 72 |n't work| polymor|
|00000c80| 70 68 69 63 61 6c 6c 79 | 2e 0d 2f 2f 09 54 68 69 |phically|..//.Thi|
|00000c90| 73 20 69 73 20 61 20 64 | 65 66 69 63 69 65 6e 63 |s is a d|eficienc|
|00000ca0| 79 20 69 6e 20 43 46 72 | 6f 6e 74 20 61 73 20 63 |y in CFr|ont as c|
|00000cb0| 6f 6d 70 61 72 65 64 20 | 77 69 74 68 20 43 2b 2b |ompared |with C++|
|00000cc0| 20 41 52 4d 20 77 68 69 | 63 68 20 73 70 65 63 69 | ARM whi|ch speci|
|00000cd0| 66 69 65 73 20 6f 62 6a | 2e 7e 43 6c 61 73 73 28 |fies obj|.~Class(|
|00000ce0| 29 0d 2f 2f 09 61 73 20 | 61 20 76 61 6c 69 64 20 |).//.as |a valid |
|00000cf0| 76 69 72 74 75 61 6c 20 | 63 61 6c 6c 20 73 79 6e |virtual |call syn|
|00000d00| 74 61 78 2e 0d 2f 2f 0d | 2f 2f 09 41 6c 73 6f 20 |tax..//.|//.Also |
|00000d10| 77 61 74 63 68 20 6f 75 | 74 20 66 6f 72 20 6d 61 |watch ou|t for ma|
|00000d20| 63 72 6f 20 65 78 70 61 | 6e 73 69 6f 6e 73 20 69 |cro expa|nsions i|
|00000d30| 6e 20 63 6f 6e 73 74 72 | 75 63 74 6f 72 73 20 77 |n constr|uctors w|
|00000d40| 69 74 68 20 43 46 72 6f | 6e 74 20 31 2e 30 2e 20 |ith CFro|nt 1.0. |
|00000d50| 49 74 20 68 61 73 20 62 | 65 65 6e 0d 2f 2f 09 6b |It has b|een.//.k|
|00000d60| 6e 6f 77 6e 20 74 6f 20 | 73 63 72 65 77 20 75 70 |nown to |screw up|
|00000d70| 20 6f 6e 20 6f 63 63 61 | 73 69 6f 6e 2e 20 4c 6f | on occa|sion. Lo|
|00000d80| 6f 6b 20 61 74 20 74 68 | 65 20 43 20 63 6f 64 65 |ok at th|e C code|
|00000d90| 20 69 66 20 79 6f 75 27 | 72 65 20 68 61 76 69 6e | if you'|re havin|
|00000da0| 67 20 70 72 6f 62 6c 65 | 6d 73 2e 20 0d 2f 2f 0d |g proble|ms. .//.|
|00000db0| 2f 2f 09 4d 50 57 20 43 | 20 64 6f 65 73 20 61 20 |//.MPW C| does a |
|00000dc0| 76 65 72 79 20 67 6f 6f | 64 20 6a 6f 62 20 6f 66 |very goo|d job of|
|00000dd0| 20 6f 70 74 69 6d 69 7a | 69 6e 67 20 6f 75 74 20 | optimiz|ing out |
|00000de0| 74 68 65 20 6c 6f 6f 70 | 73 2c 20 6d 61 6b 69 6e |the loop|s, makin|
|00000df0| 67 20 74 68 65 20 67 65 | 6e 65 72 61 74 65 64 20 |g the ge|nerated |
|00000e00| 63 6f 64 65 0d 2f 2f 09 | 63 6f 6d 70 61 72 61 62 |code.//.|comparab|
|00000e10| 6c 65 20 74 6f 20 74 68 | 65 20 70 72 65 76 69 6f |le to th|e previo|
|00000e20| 75 73 20 76 65 72 73 69 | 6f 6e 73 2e 0d 2f 2f 0d |us versi|ons..//.|
|00000e30| 0d 0d 23 64 65 66 69 6e | 65 20 74 72 79 20 5c 0d |..#defin|e try \.|
|00000e40| 09 09 6a 6d 70 5f 62 75 | 66 20 65 72 72 6f 72 42 |..jmp_bu|f errorB|
|00000e50| 75 66 3b 20 5c 0d 09 09 | 69 66 20 28 21 20 73 65 |uf; \...|if (! se|
|00000e60| 74 6a 6d 70 28 65 72 72 | 6f 72 42 75 66 29 20 29 |tjmp(err|orBuf) )|
|00000e70| 20 7b 20 5c 0d 09 09 09 | 46 61 69 6c 49 6e 66 6f | { \....|FailInfo|
|00000e80| 09 66 69 3b 20 5c 0d 09 | 09 09 43 61 74 63 68 46 |.fi; \..|..CatchF|
|00000e90| 61 69 6c 75 72 65 73 28 | 26 66 69 2c 20 53 74 61 |ailures(|&fi, Sta|
|00000ea0| 6e 64 61 72 64 48 61 6e | 64 6c 65 72 2c 20 65 72 |ndardHan|dler, er|
|00000eb0| 72 6f 72 42 75 66 29 3b | 20 5c 0d 09 09 09 64 6f |rorBuf);| \....do|
|00000ec0| 20 7b 20 5c 0d 0d 23 64 | 65 66 69 6e 65 20 63 61 | { \..#d|efine ca|
|00000ed0| 74 63 68 20 5c 0d 09 09 | 09 7d 20 77 68 69 6c 65 |tch \...|.} while|
|00000ee0| 20 28 30 29 3b 20 5c 0d | 09 09 09 53 75 63 63 65 | (0); \.|...Succe|
|00000ef0| 73 73 28 26 66 69 29 3b | 20 5c 0d 09 09 09 7d 20 |ss(&fi);| \....} |
|00000f00| 5c 0d 09 09 65 6c 73 65 | 20 5c 0d 09 09 09 66 6f |\...else| \....fo|
|00000f10| 72 28 3b 20 28 31 29 3b | 20 46 61 69 6c 75 72 65 |r(; (1);| Failure|
|00000f20| 28 67 46 61 69 6c 45 72 | 72 6f 72 2c 20 67 46 61 |(gFailEr|ror, gFa|
|00000f30| 69 6c 4d 65 73 73 61 67 | 65 29 29 0d 0d 0d 2f 2a |ilMessag|e)).../*|
|00000f40| 0d 09 54 68 65 20 64 65 | 66 61 75 6c 74 20 4d 61 |..The de|fault Ma|
|00000f50| 63 41 70 70 2f 4f 62 6a | 65 63 74 20 50 61 73 63 |cApp/Obj|ect Pasc|
|00000f60| 61 6c 20 73 65 6d 61 6e | 74 69 63 73 20 61 72 65 |al seman|tics are|
|00000f70| 20 74 68 61 74 20 72 65 | 74 75 72 6e 69 6e 67 20 | that re|turning |
|00000f80| 66 72 6f 6d 0d 09 61 6e | 20 65 72 72 6f 72 20 68 |from..an| error h|
|00000f90| 61 6e 64 6c 65 72 20 77 | 69 6c 6c 20 67 6f 20 74 |andler w|ill go t|
|00000fa0| 6f 20 74 68 65 20 6e 65 | 78 74 20 66 61 69 6c 75 |o the ne|xt failu|
|00000fb0| 72 65 20 68 61 6e 64 6c | 65 72 20 6f 6e 20 74 68 |re handl|er on th|
|00000fc0| 65 0d 09 73 74 61 63 6b | 2e 20 20 54 68 65 20 77 |e..stack|. The w|
|00000fd0| 61 79 20 77 65 20 64 6f | 20 74 68 69 73 20 69 6e |ay we do| this in|
|00000fe0| 20 43 2b 2b 20 69 73 20 | 74 68 61 74 20 77 65 20 | C++ is |that we |
|00000ff0| 63 61 6c 6c 20 66 61 69 | 6c 75 72 65 0d 09 61 67 |call fai|lure..ag|
|00001000| 61 69 6e 20 77 69 74 68 | 20 74 68 65 20 73 61 6d |ain with| the sam|
|00001010| 65 20 65 72 72 6f 72 20 | 69 6e 66 6f 72 6d 61 74 |e error |informat|
|00001020| 69 6f 6e 2e 20 20 57 65 | 20 63 61 6e 20 75 73 65 |ion. We| can use|
|00001030| 20 61 20 67 6f 74 6f 20 | 28 62 72 65 61 6b 29 20 | a goto |(break) |
|00001040| 6f 75 74 0d 09 6f 66 20 | 74 68 65 20 63 61 74 63 |out..of |the catc|
|00001050| 68 20 62 6c 6f 63 6b 20 | 74 6f 20 73 74 6f 70 20 |h block |to stop |
|00001060| 74 68 65 20 65 72 72 6f | 72 20 70 72 6f 63 65 73 |the erro|r proces|
|00001070| 73 69 6e 67 2e 0d 20 2a | 2f 0d 0d 2f 2f 20 53 68 |sing.. *|/..// Sh|
|00001080| 6f 75 6c 64 20 67 6f 20 | 69 6e 20 55 46 61 69 6c |ould go |in UFail|
|00001090| 75 72 65 2e 68 0d 0d 23 | 69 66 64 65 66 20 5f 5f |ure.h..#|ifdef __|
|000010a0| 63 70 6c 75 73 70 6c 75 | 73 0d 69 6e 6c 69 6e 65 |cplusplu|s.inline|
|000010b0| 20 76 6f 69 64 20 46 61 | 69 6c 49 6e 69 74 28 42 | void Fa|ilInit(B|
|000010c0| 6f 6f 6c 65 61 6e 20 74 | 29 20 7b 20 69 66 20 28 |oolean t|) { if (|
|000010d0| 74 29 20 46 61 69 6c 75 | 72 65 28 6d 65 6d 46 75 |t) Failu|re(memFu|
|000010e0| 6c 6c 45 72 72 2c 30 29 | 3b 20 7d 0d 23 65 6c 73 |llErr,0)|; }.#els|
|000010f0| 65 0d 23 64 65 66 69 6e | 65 09 46 61 69 6c 49 6e |e.#defin|e.FailIn|
|00001100| 69 74 28 74 29 09 09 7b | 20 69 66 20 28 74 29 20 |it(t)..{| if (t) |
|00001110| 46 61 69 6c 75 72 65 28 | 6d 65 6d 46 75 6c 6c 45 |Failure(|memFullE|
|00001120| 72 72 2c 30 29 3b 20 7d | 0d 23 65 6e 64 69 66 0d |rr,0); }|.#endif.|
|00001130| 0d 0d 23 65 6e 64 69 66 | 0d 00 00 00 00 00 00 00 |..#endif|........|
|00001140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001180| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00001190| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000011a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000011b0| 0c 45 78 63 65 70 74 69 | 6f 6e 73 2e 68 e2 02 00 |.Excepti|ons.h...|
|000011c0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 03 00 5a |..TEXTMP|S .....Z|
|000011d0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 03 00 5a |..TEXTMP|S .....Z|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 a2 2c 15 e7 00 00 | 10 b9 00 00 01 ac 72 74 |...,....|......rt|
|00001200| 0d 23 0d 23 09 45 78 63 | 65 70 74 69 6f 6e 20 68 |.#.#.Exc|eption h|
|00001210| 61 6e 64 6c 69 6e 67 20 | 66 6f 72 20 4d 50 57 20 |andling |for MPW |
|00001220| 50 61 73 63 61 6c 2c 20 | 4d 61 63 41 70 70 20 61 |Pascal, |MacApp a|
|00001230| 6e 64 20 4d 50 57 20 43 | 0d 23 0d 23 09 55 46 61 |nd MPW C|.#.#.UFa|
|00001240| 69 6c 75 72 65 20 28 61 | 6b 61 20 53 69 67 6e 61 |ilure (a|ka Signa|
|00001250| 6c 73 29 20 2d 20 d2 45 | 78 63 65 70 74 69 6f 6e |ls) - .E|xception|
|00001260| 61 6c 20 63 6f 64 65 2c | 20 77 69 74 68 20 61 20 |al code,| with a |
|00001270| 66 65 77 20 65 78 63 65 | 70 74 69 6f 6e 73 2e d3 |few exce|ptions..|
|00001280| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 3b |...H..Mo|naco...;|
|00001290| 00 00 00 14 00 01 a3 7c | 00 0a 00 64 00 1c 01 dd |.......||...d....|
|000012a0| 02 3d 00 00 00 00 00 06 | 00 04 00 2a 00 03 01 dd |.=......|...*....|
|000012b0| 02 7d 00 2c 00 0b 00 8e | 02 5a a4 70 8e a2 00 00 |.}.,....|.Z.p....|
|000012c0| 09 97 00 00 09 97 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|000012d0| 00 2a 00 03 01 dd 02 7d | 00 2c 00 0b 00 8e 02 5a |.*.....}|.,.....Z|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 47 |.....n..|.n...>.G|
|00001300| d0 38 0b c2 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |.8......|.>..MPSR|
|00001310| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00001320| 03 f0 ff ff 00 00 00 4c | 00 49 b9 d8 00 00 00 00 |.......L|.I......|
|00001330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+